// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import aa from '../static/js/label_ver.js'
Vue.use(ElementUI);
import Search from './components/Search.vue';
Vue.component('Search', Search);
import iNav from './components/i-nav.vue';
Vue.component('i-nav', iNav);
import roomSechar from './components/roomSechar.vue';
Vue.component('roomSechar', roomSechar);
Vue.config.productionTip = false
var ip1 = "http://172.16.31.75:4000"
var ip2 = ""
Vue.prototype.getAjaxUrl = function() {
  if (window.location.host.indexOf(':4000') > 0) {
    return ip2
  } else {
    return ip1
  }
}
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {
    App
  },
  template: '<App/>'
})

var user_info = null
Vue.prototype.get_user_info = function() {
  return user_info
}
Vue.prototype.set_user_info = function(dict) {
  user_info = dict
  return user_info
}
